package ;

 import java.util.Scanner;

 public class TestNet {
    
         public static void main(String[] args) {
             int n ;
             Scanner  scByte = new Scanner(System.in);
             n= scByte.nextInt();
             System.out.println(reverse(n));
         }
         
         public static int reverse(int i ){
             int s ,j =0;
             s= i;
             while(s !=0){
                 j = j*10+s%10;  //取出最低位上的数字 ,依次得到反转的数字 
                s=s/10;  //降位 
            }
             return j;
         }
     }

